let config;
let certifiedConfig;
const md = window.markdownit();
axios.get('../static/data/certifiedConfig.json') //在config文件加载完后再回调运行vue
    .then(function (response) {
        certifiedConfig = response.data;
        axios.get('../static/data/commonConfig.json') //在config文件加载完后再回调运行vue
            .then(function (response) {
                commonConfig = response.data;
                runVue();
            })
            .catch(function (error) {
                console.log(error);
            })
    })
    .catch(function (error) {
        console.log(error);
    })
// VUE脚本
const runVue = () => {
    const {ref, computed, reactive} = Vue;
    const App = {
        setup() {
            const topBars = commonConfig['topBars'];
            const isLogin = ref(true);
            const userButtonText = commonConfig['userButtonText'];
            const MARGCOIntroduceText = certifiedConfig['MARGCOIntroduceText'];
            const goTo = (link) => {
                window.location.href = link;
            }
            return {
                goTo,
                topBars,
                isLogin,
                userButtonText,
                MARGCOIntroduceText
            }
        },
    };
    const app = Vue.createApp(App);
    app.mount("#app");
}